package homework;

import java.io.File;
import java.util.Scanner;

public class Test03 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个目录名:");
        String name = scanner.nextLine();
        File dir = new File("./" + name);
        if (dir.exists()) {
            System.out.println(name + "已经存在了!");
        } else {
            dir.mkdirs();
            System.out.println("创建完毕!");
        }
    }
}
